package shujia.day08;

public class StringTest2 {
    public static void main(String[] args) {
        String s1 = "hello";
        String s2 = "world";
        String s3 = "helloworld";
        System.out.println(s3 == "hello" + "world");
        System.out.println(s3 == s1 + s2); // 变量字符串相加实际上是在堆内存中拼接
        System.out.println(s3.equals(s1 + s2));

    }
}
